home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 20.3 KB | 727 lines | [TEXT/MPCC] |
-
-
- // for QuickDraw 3D
- #include "QD3D.h"
- #include "QD3DMath.h"
- #include "QD3DAcceleration.h"
- #include "QD3DDrawContext.h"
- #include "QD3DShader.h"
- #include "QD3DLight.h"
- #include "QD3DRenderer.h"
- #include "QD3DTransform.h"
- #include "QD3DGroup.h"
- #include "QD3DCamera.h"
-
-
- #include "Geometries.h"
- #include "MyErrorHandler.h"
- #include "Quickdraw3DSupport.h"
-
-
-
- //-----------------------------------------------------------------------
- // local utility functions
- void GetGroupBBox(DocumentHdl theDocument, TQ3BoundingBox *viewBBox);
- static TQ3Status GetDocumentGroupBoundingBox(DocumentHdl theDocument,
- TQ3BoundingBox *viewBBox) ;
-
-
- //-----------------------------------------------------------------------
-
- DocumentHdl GetDocumentHdl(WindowObjHndl obj)
- {
- check(obj != NULL);
- check((*obj)->refCon != NULL);
-
- return (DocumentHdl) (*obj)->refCon;
- }
-
- //-----------------------------------------------------------------------
- // Call this after initializing the Toolbox, but before entering
- // the main event loop.
- //-----------------------------------------------------------------------
- void InitQuickDraw3DSupport(void)
- {
- //
- // Initialize QuickDraw 3D, open a connection to QuickDraw 3D
- //
- if (Q3Initialize() == kQ3Failure) {
- DebugStr("\pErInitialize returned failure.");
- ExitToShell() ;
- }
-
- //
- // install the error handler - this gets called whenever
- // an error occurs, which means we don't have to check so much
- //
- Q3Error_Register(MyErrorHandler, 0L);
- Q3Warning_Register(MyWarningHandler, 0L);
- }
-
- //-----------------------------------------------------------------------
- // Call this after dropping out of the main event loop.
- //-----------------------------------------------------------------------
- void TeardownQuickDraw3DSupport(void)
- {
- //
- // Close our connection to the QuickDraw 3D library
- //
- if (Q3Exit() == kQ3Failure) DebugStr("\pErExit returned failure.");
- }
-
- //-----------------------------------------------------------------------
-
- void InitDocumentData(WindowPtr win, DocumentHdl theDocument)
- {
- TQ3Point3D myOrigin = { 0, 0, 0 } ;
-
- check(theDocument != NULL);
-
- // Lock and load
- HLock((Handle)theDocument);
-
- // sets up the 3d data for the scene
- // Create view for QuickDraw 3D.
- (**theDocument).fView = MyNewView(win);
-
- // the main display group:
- (**theDocument).fModel = NULL ;
-
- // the drawing styles:
- (**theDocument).fInterpolation = Q3InterpolationStyle_New(kQ3InterpolationStyleNone) ;
- (**theDocument).fBackFacing = Q3BackfacingStyle_New(kQ3BackfacingStyleBoth);
- (**theDocument).fFillStyle = Q3FillStyle_New(kQ3FillStyleFilled);
-
- (**theDocument).fGroupScale = 1;
- (**theDocument).fGroupCenter = myOrigin ;
-
- // set up an illumination shder for this document
- (**theDocument).fShader = Q3PhongIllumination_New() ;
-
- // set a default style for this document
- (**theDocument).fCurrentInterpolation = kQ3InterpolationStyleNone ;
-
- // set the rotation matrix the identity matrix
- Q3Matrix4x4_SetIdentity(&(**theDocument).fRotation);
-
- // unlock the handle
- HUnlock((Handle) theDocument) ;
- }
-
- //-----------------------------------------------------------------------
-
- void DisposeDocumentData(DocumentHdl theDocument)
- {
- // Lock and load
- check(theDocument != NULL);
- HLock((Handle)theDocument);
-
- if ((**theDocument).fView)
- Q3Object_Dispose((**theDocument).fView) ; // the view for the scene
-
- if ((**theDocument).fModel)
- Q3Object_Dispose((**theDocument).fModel) ; // object in the scene being modelled
-
- if ((**theDocument).fInterpolation)
- Q3Object_Dispose((**theDocument).fInterpolation) ; // interpolation style used when rendering
-
- if ((**theDocument).fBackFacing)
- Q3Object_Dispose((**theDocument).fBackFacing) ; // whether to draw shapes that face away from the camera
-
- if ((**theDocument).fFillStyle)
- Q3Object_Dispose((**theDocument).fFillStyle) ; // whether drawn as solid filled object or decomposed to components
-
- HUnlock((Handle) theDocument) ;
-
- // And free the storage used by the document handle
- DisposeHandle((Handle) theDocument);
- }
-
- //-----------------------------------------------------------------------
- // Create and init a document with the 3d stuff - gets called
- // by both open and new
- //-----------------------------------------------------------------------
- DocumentHdl CreateDocument(WindowPtr win)
- {
- DocumentHdl theDocument;
-
- theDocument = (DocumentHdl) NewHandleClear(sizeof(DocumentRec));
- require(theDocument != NULL, NewHandleClearFailed);
-
- // initialise our document structure
- InitDocumentData(win, theDocument);
-
- NewHandleClearFailed:
- return theDocument;
- }
-
- //-----------------------------------------------------------------------
- // Submit the scene for rendering/fileIO and picking
- //-----------------------------------------------------------------------
- TQ3Status SubmitScene(DocumentHdl theDocument)
- {
- TQ3Vector3D globalScale;
- TQ3Vector3D globalTranslate;
-
- globalScale.x = globalScale.y = globalScale.z = (**theDocument).fGroupScale;
- globalTranslate = *(TQ3Vector3D *)&(**theDocument).fGroupCenter;
- Q3Vector3D_Scale(&globalTranslate, -1, &globalTranslate);
- Q3Style_Submit((**theDocument).fInterpolation, (**theDocument).fView);
- Q3Style_Submit((**theDocument).fBackFacing , (**theDocument).fView);
- Q3Style_Submit((**theDocument).fFillStyle, (**theDocument).fView);
-
- Q3InterpolationStyle_Submit((**theDocument).fCurrentInterpolation, (**theDocument).fView);
-
- Q3MatrixTransform_Submit( &(**theDocument).fRotation, (**theDocument).fView);
-
- Q3ScaleTransform_Submit(&globalScale, (**theDocument).fView);
- Q3TranslateTransform_Submit(&globalTranslate, (**theDocument).fView);
-
- Q3Shader_Submit( (**theDocument).fShader, (**theDocument).fView ) ;
- Q3DisplayGroup_Submit( (**theDocument).fModel, (**theDocument).fView);
-
- return kQ3Success ;
- }
-
- //-----------------------------------------------------------------------
-
- static TQ3Status GetDocumentGroupBoundingBox(
- DocumentHdl theDocument ,
- TQ3BoundingBox *viewBBox)
- {
- TQ3Status status;
- TQ3ViewStatus viewStatus ;
-
- status = Q3View_StartBoundingBox( (**theDocument).fView, kQ3ComputeBoundsApproximate );
- do {
- Q3DisplayGroup_Submit( (**theDocument).fModel, (**theDocument).fView);
- } while((viewStatus = Q3View_EndBoundingBox( (**theDocument).fView, viewBBox )) == kQ3ViewStatusRetraverse );
- return status ;
- }
-
- //-----------------------------------------------------------------------
-
- TQ3ViewObject MyNewView(WindowPtr theWindow)
- {
- TQ3Status myStatus;
- TQ3ViewObject myView;
- TQ3DrawContextObject myDrawContext;
- TQ3RendererObject myRenderer;
- TQ3CameraObject myCamera;
- TQ3GroupObject myLights;
-
- myView = Q3View_New();
-
- // Create and set draw context.
- if ((myDrawContext = MyNewDrawContext(theWindow)) == nil )
- goto bail;
-
- if ((myStatus = Q3View_SetDrawContext(myView, myDrawContext)) == kQ3Failure )
- goto bail;
-
- Q3Object_Dispose( myDrawContext ) ;
-
- // Create and set renderer.
- //
- // hacky way to do this, but since I wanted these snippets to have
- // a minimal interface, this will suffice
- //
- // change the next line to “#if 1” to use the WF renderer
-
- #if 0
- // this would use the wireframe renderer
- myRenderer = Q3Renderer_NewFromType(kQ3RendererTypeWireFrame);
- if ((myStatus = Q3View_SetRenderer(myView, myRenderer)) == kQ3Failure ) {
- goto bail;
- }
- #else
- // this would use the interactive software renderer
-
- if ((myRenderer = Q3Renderer_NewFromType(kQ3RendererTypeInteractive)) != nil ) {
- if ((myStatus = Q3View_SetRenderer(myView, myRenderer)) == kQ3Failure ) {
- goto bail;
- }
- }
- else {
- goto bail;
- }
- #endif
-
- Q3Object_Dispose(myRenderer);
-
- // Create and set camera.
- if ( (myCamera = MyNewCamera(theWindow)) == nil )
- goto bail;
-
- if ((myStatus = Q3View_SetCamera(myView, myCamera)) == kQ3Failure )
- goto bail;
-
- Q3Object_Dispose( myCamera ) ;
-
- // Create and set lights.
- if ((myLights = MyNewLights()) == nil )
- goto bail;
-
- if ((myStatus = Q3View_SetLightGroup(myView, myLights)) == kQ3Failure )
- goto bail;
-
- Q3Object_Dispose(myLights);
-
- // Done!!!
- return ( myView );
-
- bail:
- // If any of the above failed, then don't return a view.
- return ( nil );
- }
-
- //-----------------------------------------------------------------------
-
- TQ3DrawContextObject MyNewDrawContext(WindowPtr theWindow)
- {
- TQ3DrawContextData myDrawContextData;
- TQ3MacDrawContextData myMacDrawContextData;
- TQ3ColorARGB ClearColor;
- TQ3DrawContextObject myDrawContext ;
-
- ClearColor.a = 1.0;
- ClearColor.r = 1.0;
- ClearColor.g = 1.0;
- ClearColor.b = 1.0;
-
- // Fill in draw context data.
- myDrawContextData.clearImageMethod = kQ3ClearMethodWithColor;
- myDrawContextData.clearImageColor = ClearColor;
-
- myDrawContextData.paneState = kQ3False;
- myDrawContextData.maskState = kQ3False;
-
- myDrawContextData.doubleBufferState = kQ3True;
-
- myMacDrawContextData.drawContextData = myDrawContextData;
-
- myMacDrawContextData.window = (CGrafPtr) theWindow; // this is the window associated with the view
- myMacDrawContextData.library = kQ3Mac2DLibraryNone;
- myMacDrawContextData.viewPort = nil;
- myMacDrawContextData.grafPort = nil;
-
- // Create draw context and return it, if it’s nil the caller must handle
- myDrawContext = Q3MacDrawContext_New(&myMacDrawContextData) ;
-
- return myDrawContext ;
- }
-
- //-----------------------------------------------------------------------
-
- TQ3CameraObject MyNewCamera(WindowPtr theWindow)
- {
- TQ3CameraObject myCamera;
- TQ3CameraData myCameraData;
- TQ3ViewAngleAspectCameraData myViewAngleCameraData;
- TQ3Point3D cameraFrom = { 0.0, 0.0, 30.0 };
- TQ3Point3D cameraTo = { 0.0, 0.0, 0.0 };
- TQ3Vector3D cameraUp = { 0.0, 1.0, 0.0 };
-
- float fieldOfView = .52359333333;
- float hither = 0.001;
- float yon = 1000;
-
- // Fill in camera data.
- myCameraData.placement.cameraLocation = cameraFrom;
- myCameraData.placement.pointOfInterest = cameraTo;
- myCameraData.placement.upVector = cameraUp;
-
- myCameraData.range.hither = hither;
- myCameraData.range.yon = yon;
-
- myCameraData.viewPort.origin.x = -1.0;
- myCameraData.viewPort.origin.y = 1.0;
- myCameraData.viewPort.width = 2.0;
- myCameraData.viewPort.height = 2.0;
-
- myViewAngleCameraData.cameraData = myCameraData;
- myViewAngleCameraData.fov = fieldOfView ;
-
- // set up the aspect ratio based on the window
- myViewAngleCameraData.aspectRatioXToY =
- (float) (theWindow->portRect.right - theWindow->portRect.left) /
- (float) (theWindow->portRect.bottom - theWindow->portRect.top);
-
- myCamera = Q3ViewAngleAspectCamera_New(&myViewAngleCameraData);
-
- // Return the camera.
- return ( myCamera );
- }
-
- //-----------------------------------------------------------------------
-
- TQ3GroupObject MyNewLights()
- {
- TQ3GroupPosition myGroupPosition;
- TQ3GroupObject myLightList;
- TQ3LightData myLightData;
- TQ3PointLightData myPointLightData;
- TQ3DirectionalLightData myDirectionalLightData;
- TQ3LightObject myAmbientLight, myPointLight, myFillLight;
- TQ3Point3D pointLocation = { -10.0, 0.0, 10.0 };
- TQ3Vector3D fillDirection = { 10.0, 0.0, 10.0 };
- TQ3ColorRGB WhiteLight = { 1.0, 1.0, 1.0 };
-
- // Set up light data for ambient light. This light data will be used for point and fill
- // light also.
-
- myLightData.isOn = kQ3True;
- myLightData.color = WhiteLight;
-
- // Create ambient light.
- myLightData.brightness = .2;
- myAmbientLight = Q3AmbientLight_New(&myLightData);
- if ( myAmbientLight == nil )
- goto bail;
-
- // Create point light.
- myLightData.brightness = 1.0;
- myPointLightData.lightData = myLightData;
- myPointLightData.castsShadows = kQ3False;
- myPointLightData.attenuation = kQ3AttenuationTypeNone;
- myPointLightData.location = pointLocation;
- myPointLight = Q3PointLight_New(&myPointLightData);
- if ( myPointLight == nil )
- goto bail;
-
- // Create fill light.
- myLightData.brightness = .2;
- myDirectionalLightData.lightData = myLightData;
- myDirectionalLightData.castsShadows = kQ3False;
- myDirectionalLightData.direction = fillDirection;
- myFillLight = Q3DirectionalLight_New(&myDirectionalLightData);
- if ( myFillLight == nil )
- goto bail;
-
- // Create light group and add each of the lights into the group.
- myLightList = Q3LightGroup_New();
- if ( myLightList == nil )
- goto bail;
- myGroupPosition = Q3Group_AddObject(myLightList, myAmbientLight);
- if ( myGroupPosition == 0 )
- goto bail;
- myGroupPosition = Q3Group_AddObject(myLightList, myPointLight);
- if ( myGroupPosition == 0 )
- goto bail;
- myGroupPosition = Q3Group_AddObject(myLightList, myFillLight);
- if ( myGroupPosition == 0 )
- goto bail;
-
- Q3Object_Dispose( myAmbientLight ) ;
- Q3Object_Dispose( myPointLight ) ;
- Q3Object_Dispose( myFillLight ) ;
-
- // Done!
- return ( myLightList );
-
- bail:
- // If any of the above failed, then return nothing!
- return ( nil );
- }
-
- //-----------------------------------------------------------------------
-
- void GetGroupBBox(DocumentHdl theDocument, TQ3BoundingBox *viewBBox)
- {
- TQ3Point3D from = { 0.0, 0.0, 1.0 };
- TQ3Point3D to = { 0.0, 0.0, 0.0 };
- TQ3Vector3D up = { 0.0, 1.0, 0.0 };
-
- float fieldOfView = .52359333333;
- float hither = 0.5;
- float yon = 1.5;
- TQ3GroupObject mainGroup = (**theDocument).fModel ;
-
- TQ3Status status;
-
-
- status = GetDocumentGroupBoundingBox( theDocument , viewBBox) ;
-
- //
- // If we have a point model, then the "viewBBox" would end up
- // being a "singularity" at the location of the point. As
- // this bounding "box" is used in setting up the camera spec,
- // we get bogus input into Escher.
-
- {
- float xSize, ySize, zSize;
-
- xSize = viewBBox->max.x - viewBBox->min.x;
- ySize = viewBBox->max.y - viewBBox->min.y;
- zSize = viewBBox->max.z - viewBBox->min.z;
-
- if (xSize <= kQ3RealZero &&
- ySize <= kQ3RealZero &&
- zSize <= kQ3RealZero) {
-
- viewBBox->max.x += 0.0001;
- viewBBox->max.y += 0.0001;
- viewBBox->max.z += 0.0001;
-
- viewBBox->min.x -= 0.0001;
- viewBBox->min.y -= 0.0001;
- viewBBox->min.z -= 0.0001;
- }
- }
- }
-
- //-----------------------------------------------------------------------
-
- TQ3Point3D AdjustCamera(DocumentHdl theDocument,
- short winWidth,
- short winHeight)
- {
- float fieldOfView;
- float hither;
- float yon;
- TQ3CameraPlacement placement;
- TQ3CameraRange range;
- TQ3BoundingBox viewBBox;
- long fromAxis;
- float maxDimension;
- float xSize, ySize, zSize;
- float weights[2] = { 0.5, 0.5 };
- TQ3Point3D points[2];
- TQ3Vector3D viewVector;
- TQ3Vector3D normViewVector;
- TQ3Vector3D eyeToFrontClip;
- TQ3Vector3D eyeToBackClip;
- float viewDistance;
- TQ3Vector3D diagonalVector;
- float ratio;
- TQ3CameraObject camera;
-
- TQ3ViewObject theView = (**theDocument).fView ;
- TQ3GroupObject mainGroup = (**theDocument).fModel ;
-
- TQ3Point3D *documentGroupCenter = &(**theDocument).fGroupCenter ;
- float *documentGroupScale = &(**theDocument).fGroupScale ;
-
- Q3View_GetCamera( theView, &camera);
- GetGroupBBox( theDocument, &viewBBox);
-
- /*
- * If we have a point model, then the "viewBBox" would end up
- * being a "singularity" at the location of the point. As
- * this bounding "box" is used in setting up the camera spec,
- * we get bogus input into Escher.
- */
- xSize = viewBBox.max.x - viewBBox.min.x;
- ySize = viewBBox.max.y - viewBBox.min.y;
- zSize = viewBBox.max.z - viewBBox.min.z;
-
- if (xSize <= kQ3RealZero &&
- ySize <= kQ3RealZero &&
- zSize <= kQ3RealZero) {
- viewBBox.max.x += 0.0001;
- viewBBox.max.y += 0.0001;
- viewBBox.max.z += 0.0001;
-
- viewBBox.min.x -= 0.0001;
- viewBBox.min.y -= 0.0001;
- viewBBox.min.z -= 0.0001;
- }
-
- points[0] = viewBBox.min;
- points[1] = viewBBox.max;
-
- Q3Point3D_AffineComb(points, weights, 2, documentGroupCenter);
-
- /*
- * The "from" point is on a vector perpendicular to the plane
- * in which the bounding box has greatest dimension. As "up" is
- * always in the positive y direction, look at x and z directions.
- */
- xSize = viewBBox.max.x - viewBBox.min.x;
- zSize = viewBBox.max.z - viewBBox.min.z;
-
- if (xSize > zSize) {
- fromAxis = kQ3AxisZ;
- } else {
- fromAxis = kQ3AxisX;
- }
-
- /*
- * Compute the length of the diagonal of the bounding box.
- *
- * The hither and yon planes are adjusted so that the
- * diagonal of the bounding box is 7/8 the size of the
- * minimum dimension of the view frustum. The diagonal is used instead
- * of the maximum size (in x, y, or z) so that when you rotate
- * the object, the corners don't get clipped out.
- */
- Q3Point3D_Subtract(
- &viewBBox.max,
- &viewBBox.min,
- &diagonalVector);
-
- maxDimension = Q3Vector3D_Length(&diagonalVector);
- maxDimension *= 8.0 / 7.0;
-
- ratio = 1.0 / maxDimension;
-
- *documentGroupScale = ratio;
-
- Q3Camera_GetPlacement(camera, &placement);
-
- Q3Point3D_Subtract(
- &placement.cameraLocation,
- &placement.pointOfInterest,
- &viewVector);
-
- viewDistance = Q3Vector3D_Length(&viewVector);
-
- Q3Vector3D_Normalize(&viewVector, &normViewVector);
-
- Q3Vector3D_Scale(&normViewVector,
- viewDistance - ratio * maxDimension/2.0,
- &eyeToFrontClip);
-
- Q3Vector3D_Scale(&normViewVector,
- viewDistance + ratio * maxDimension/2.0,
- &eyeToBackClip);
-
- hither = Q3Vector3D_Length(&eyeToFrontClip);
- yon = Q3Vector3D_Length(&eyeToBackClip);
-
- fieldOfView = 2 * atan((ratio * maxDimension/2.0)/hither);
-
- range.hither = hither;
- range.yon = yon;
-
- Q3Camera_SetRange(camera, &range);
-
- Q3ViewAngleAspectCamera_SetFOV(camera, fieldOfView);
-
- Q3ViewAngleAspectCamera_SetAspectRatio(
- camera, (float) winWidth / (float) winHeight);
-
- Q3Object_Dispose(camera);
-
- return( *documentGroupCenter );
- }
-
- //-----------------------------------------------------------------------
-
- void SetWindowGeometry(WindowPtr win, short item)
- {
- WindowObjHndl obj;
- DocumentHdl theDocument;
- TQ3Point3D myOrigin = { 0, 0, 0 } ;
- extern Boolean Is3DWindow(WindowPtr);
-
- check(Is3DWindow(win));
- check(theDocument != NULL);
-
- obj = (WindowObjHndl) GetWRefCon(win);
- theDocument = GetDocumentHdl(obj);
- require(theDocument != NULL, DocIsNULL);
-
- HLock((Handle) theDocument) ;
-
- if ((**theDocument).fModel != NULL) {
- Q3Object_Dispose((**theDocument).fModel);
- (**theDocument).fModel = nil;
- }
-
- (**theDocument).fModel = BuildGeometry(item);
- (**theDocument).fGroupScale = 1;
- (**theDocument).fGroupCenter = myOrigin;
- AdjustCamera( theDocument,
- (win->portRect.right - win->portRect.left),
- (win->portRect.bottom - win->portRect.top) ) ;
-
- HUnlock((Handle) theDocument);
- SetPort(win);
- InvalRect(&win->portRect);
-
- DocIsNULL:
- return;
- }
-
- //-----------------------------------------------------------------------
-
- void SetWindowRenderer( WindowPtr win, short item )
- {
- TQ3RendererObject rendererObject;
- TQ3DrawContextObject myDrawContext;
- WindowObjHndl obj;
- DocumentHdl theDocument;
-
- obj = (WindowObjHndl) GetWRefCon(win);
- theDocument = GetDocumentHdl(obj);
- require(theDocument != NULL, DocIsNULL);
-
- HLock((Handle) theDocument) ;
-
-
- switch (item) {
- case iWF:
- rendererObject = Q3Renderer_NewFromType( kQ3RendererTypeWireFrame );
- Q3View_SetRendererByType( (*theDocument)->fView, kQ3RendererTypeWireFrame );
- Q3Object_Dispose(rendererObject);
- break;
-
- case iCTSW:
- rendererObject = Q3Renderer_NewFromType(kQ3RendererTypeInteractive);
- Q3InteractiveRenderer_SetDoubleBufferBypass(rendererObject, kQ3False);
- Q3InteractiveRenderer_SetPreferences(rendererObject, kQAVendor_Apple, kQAEngine_AppleSW);
- Q3View_SetRenderer((*theDocument)->fView,rendererObject);
- break;
-
- case iCTHW:
- rendererObject = Q3Renderer_NewFromType(kQ3RendererTypeInteractive);
- Q3InteractiveRenderer_SetDoubleBufferBypass(rendererObject, kQ3True);
- Q3InteractiveRenderer_SetPreferences(rendererObject, kQAVendor_BestChoice, kQAVendor_BestChoice);
- Q3View_SetRenderer((*theDocument)->fView,rendererObject);
- Q3Object_Dispose(rendererObject);
- break;
- }
- InvalRect( &win->portRect ) ;
-
- HUnlock((Handle) theDocument);
-
- DocIsNULL:
- return;
- }
-
- void SetWindowShading( WindowPtr win, short item )
- {
- TQ3RendererObject rendererObject;
- TQ3DrawContextObject myDrawContext;
- WindowObjHndl obj;
- DocumentHdl theDocument;
-
- obj = (WindowObjHndl) GetWRefCon(win);
- theDocument = GetDocumentHdl(obj);
- require(theDocument != NULL, DocIsNULL);
-
- HLock((Handle) theDocument) ;
-
-
- switch(item){
- case iFlat :
- (**theDocument).fCurrentInterpolation = kQ3InterpolationStyleNone;
- break;
- case iVertex:
- (**theDocument).fCurrentInterpolation = kQ3InterpolationStyleVertex;
- break;
- case iPixel:
- (**theDocument).fCurrentInterpolation = kQ3InterpolationStylePixel;
- break;
- }
-
- InvalRect( &win->portRect ) ;
-
- HUnlock((Handle) theDocument);
-
- DocIsNULL:
- return;
- }
-
-